package com.basic.bio.thread;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

/**
 * @Description:
 * @Date: 2024-03-28 11:07
 * @Author: wz
 **/
public class Server {

    public static void main(String[] args){
        try {
            ServerSocket ss = new ServerSocket(9090);
            while (true){
                //接受客户端的连接
                Socket socket = ss.accept();
                new ServerThread(socket).start();
            }
        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
